package com.ruoyi.dash.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dash.mapper.TbHighStandardFarmlandMapper;
import com.ruoyi.dash.domain.TbHighStandardFarmland;
import com.ruoyi.dash.service.ITbHighStandardFarmlandService;

/**
 * 高标准农田Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-24
 */
@Service
public class TbHighStandardFarmlandServiceImpl implements ITbHighStandardFarmlandService 
{
    @Autowired
    private TbHighStandardFarmlandMapper tbHighStandardFarmlandMapper;

    /**
     * 查询高标准农田
     * 
     * @param id 高标准农田主键
     * @return 高标准农田
     */
    @Override
    public TbHighStandardFarmland selectTbHighStandardFarmlandById(String id)
    {
        return tbHighStandardFarmlandMapper.selectTbHighStandardFarmlandById(id);
    }

    /**
     * 查询高标准农田列表
     * 
     * @param tbHighStandardFarmland 高标准农田
     * @return 高标准农田
     */
    @Override
    public List<TbHighStandardFarmland> selectTbHighStandardFarmlandList(TbHighStandardFarmland tbHighStandardFarmland)
    {
        return tbHighStandardFarmlandMapper.selectTbHighStandardFarmlandList(tbHighStandardFarmland);
    }

    /**
     * 新增高标准农田
     * 
     * @param tbHighStandardFarmland 高标准农田
     * @return 结果
     */
    @Override
    public int insertTbHighStandardFarmland(TbHighStandardFarmland tbHighStandardFarmland)
    {
        return tbHighStandardFarmlandMapper.insertTbHighStandardFarmland(tbHighStandardFarmland);
    }

    /**
     * 修改高标准农田
     * 
     * @param tbHighStandardFarmland 高标准农田
     * @return 结果
     */
    @Override
    public int updateTbHighStandardFarmland(TbHighStandardFarmland tbHighStandardFarmland)
    {
        tbHighStandardFarmland.setUpdateTime(DateUtils.getNowDate());
        return tbHighStandardFarmlandMapper.updateTbHighStandardFarmland(tbHighStandardFarmland);
    }

    /**
     * 批量删除高标准农田
     * 
     * @param ids 需要删除的高标准农田主键
     * @return 结果
     */
    @Override
    public int deleteTbHighStandardFarmlandByIds(String[] ids)
    {
        return tbHighStandardFarmlandMapper.deleteTbHighStandardFarmlandByIds(ids);
    }

    /**
     * 删除高标准农田信息
     * 
     * @param id 高标准农田主键
     * @return 结果
     */
    @Override
    public int deleteTbHighStandardFarmlandById(String id)
    {
        return tbHighStandardFarmlandMapper.deleteTbHighStandardFarmlandById(id);
    }
}
